package com.akeil.flash.model;

public enum EDeviceStatusType {
	READY((byte)0x00,"准备试验"),
	FINISH((byte)0x01,"试验结束"),	
	ANASYSIS((byte)0x02,"正在试验");
	
	private byte code;
	private String name;
	
	private EDeviceStatusType(byte code,String name){
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public void setCode(byte code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EDeviceStatusType getByValue(int value) {
        for (EDeviceStatusType code : values()) {
            if (code.getCode() == value) {
                return code;
            }
        }
        return null;
    }
}
